﻿using System;
using System.Collections.Generic;
using System.Text;

namespace CpuSimulator
{
    public class Device
    {
        private int _size;
        private List<byte> _data;

        public int Size { get { return _size; } }
        public byte this[int key]
        {
            get { return _data[key]; }
            set { _data[key] = value; }
        }
        private Device() : this(0)
        {
        }
        public Device(int size)
        {
            _size = size;
            _data = new List<byte>(size);
            for (int i = 0; i < size; i++)
            {
                _data.Add(0);
            }
        }
        public void Clear()
        {
            for (int i = 0; i < _size; i++)
            {
                _data[i] = 0;
            }
        }

    }
}
